package com.situ.day3;

public class WhileTest {

	public static void main(String[] args) {
		int i = 1;
		int sum = 0;
		while (i <= 100) {
			sum = sum + i;
			System.out.print(i + " ");
			i++;
		}
		System.out.println();
		System.out.println("1+2+3+...+100=" + sum);
	}

}
